﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CC.MVC.Models
{
    /// <summary>
    /// A circle is a specific shape and can define which constructors to implement and which demensions are relevant.
    /// </summary>
    public class Circle : Shape
    {
        /// <summary>
        /// The base class' constructor already handles a single parameter option, so if we only
        /// expose this constructor for the Circle class, the others will not be accessible.
        /// </summary>
        /// <param name="x"></param>
        public Circle(double x) : base(x) { }

        public override double GetArea()
        {
            // The specific implementation of the area of a circle is PI * Radius * Radius
            return Math.PI * Math.Pow(this.X, 2);
        }
    }
}
